package com.swust.exam.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;

import com.swust.exam.dao.ClassesMapper;
import com.swust.exam.pojo.Classes;
import com.swust.exam.pojo.Exam;

@Service
public class ClassesService {
	@Autowired
	private ClassesMapper classesMapper;
	

	public Classes get(int id) {
		return classesMapper.selectByPrimaryKey(id);
	}
	
	public int delete(int id) {
		return classesMapper.deleteByPrimaryKey(id);
	}
	
	public int insert(Classes classes) {
		return classesMapper.insert(classes);
	}
	
	public int update(Classes classes) {
		return classesMapper.updateByPrimaryKey(classes);
	}

	public List<Classes> GetDetailClassInfo(){
		return classesMapper.GetDetailClassInfo();
	}

	public List<Classes> GetCourseName(){
		return classesMapper.GetCourseName();
	}
}
